<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp" %>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<%@ include file="/WEB-INF/pages/weixin/include/title.jsp"%>
    <link rel="stylesheet" href="${root}/res/weui/dist/style/weui.css"/>
    <link rel="stylesheet" href="${root}/res/weui/dist/style/weui.ex.css"/>
    <link rel="stylesheet" href="${root}/res/jsLib/weixin/weixin.css"/>
    <script src="${root}/res/weui/dist/js/zepto.min.js"></script>
    <script src="${root}/res/jsLib/weixin/weixin.js"></script>
    <script type="text/javascript">
	    $(function () {
	    	
	    	wxUtils.showToast("正在加载数据");
	    	var userId = '${user.userid}';
	    	var userName = '${user.username}';
	    	var roleCode = '${user.roleCode}';
	    	
	    	var menu = function(m1,m2){
	    		var m = '<div class="weui-cell weui-cell_access menuLink" queryState="'+m1+'">'+
		    				'<div class="weui-cell__bd">'+
				                '<span style="vertical-align: middle">'+m2+'</span>'+
				                '</div>'+
				            '<div class="weui-cell__ft"></div>'+
			            '</div>';
			    return m;
	    	}
	    	if(roleCode=='1' || roleCode=='3'){
				var menu1 = menu('tmp_f107','我的申请');
				$("#menuPanel").append(menu1);
				if(roleCode=='3'){
					$("#menuLabel").html('中介平台');
					var menu2 = menu('tmp_f102','未受理服务');
					$("#menuPanel").append(menu2);
					var menu3 = menu('tmp_f103','受理中服务');
					$("#menuPanel").append(menu3);
					var menu4 = menu('tmp_f104','已受理服务');
					$("#menuPanel").append(menu4);
					var menu5 = menu('tmp_f109','不受理服务');
					$("#menuPanel").append(menu5);
				}else{
					$("#menuLabel").html('企业平台');
				}
				$("#menuPanel").find('.menuLink').click(function(){
		    		var url = '/weixin/user/service.do?&queryState='+$(this).attr('queryState');
					wxUtils.linkClick(url);
				});
	    	}
	    	wxUtils.closeToast();
	    });
	</script>
</head>
<body>

	<div class="weui-tab wxbg">
		<div class="weui-tab__panel detail_panel">
		
		</div>
	    <div class="weui-tab__panel list_panel">
	    	<div class="weui-cells__title">账号信息</div>
		        <div class="weui-cells">
	            <a class="weui-cell weui-cell_access" href="javascript:wxUtils.linkClick('/weixin/info.do');">
	                <div class="weui-cell__hd"><img src="${base }/res/jsLib/weixin/logo-r-219.jpg" alt="" style="width:80px;display:block"></div>
	                <div class="weui-cell__bd">
	                	<h2>
	                	<c:choose>
                    		<c:when test="${user.roleCode eq '2' }">
                    			${user.username }
                    		</c:when>
                    		<c:otherwise>
                    			${user.orgName }
                    		</c:otherwise>
                    	</c:choose>
	                    </h2>
	                    <p style="font-size: 12px;color: gray;">账号：${user.username }</p>
	                    <p style="font-size: 10px;color: #ccc;">
	                    	<c:choose>
	                    		<c:when test="${user.roleCode eq '1' }">
	                    			企业用户
	                    		</c:when>
	                    		<c:when test="${user.roleCode eq '2' }">
	                    			个人用户
	                    		</c:when>
	                    		<c:when test="${user.roleCode eq '3' }">
	                    			中介用户
	                    		</c:when>
	                    	</c:choose>
	                    </p>
	                </div>
	                <div class="weui-cell__ft"></div>
	            </a>
	        </div>
			<div class="weui-cells__title" id="menuLabel">企业平台/中介平台</div>
	        <div class="weui-cells" id="menuPanel">
	            
	        </div>
		</div>
		<jsp:include page="/WEB-INF/pages/weixin/bottom.jsp?menu=4"></jsp:include>
	</div>
</body>
</html>